using GEM.Application.Common;
using GEM.Application.Dto.Role;

namespace GEM.Application.Repositories;

public interface IRoleService
{
    /// <summary>
    /// 创建角色
    /// </summary>
    /// <param name="roleName"></param>
    /// <param name="dataScope"></param>
    /// <returns></returns>
    Task<dynamic> CreateRoleAsync(string roleName, string dataScope);

    /// <summary>
    /// 移除角色
    /// </summary>
    Task<dynamic> RemoveRoleAsync(Guid roleId);

    /// <summary>
    /// 指定角色分配指定权限
    /// </summary>
    /// <param name="RoleId"></param>
    /// <param name="PermissionId"></param>
    /// <returns></returns>
    Task<dynamic> AssignPermissionAsync(Guid RoleId, Guid PermissionId);

    /// <summary>
    /// 移除角色的指定权限
    /// </summary>
    Task<dynamic> RemovePermissionAsync(Guid RoleId, Guid PermissionId);

    /// <summary>
    /// 分页查询用户
    /// </summary>
    /// <param name="pageIndex">页码</param>
    /// <param name="pageSize">每页条数</param>
    /// <returns>分页数据</returns>
    Task<PagedResult<RoleDto>> GetRolePagedAsync(int pageIndex, int pageSize);

    // 启用角色
    Task<dynamic> EnableRoleAsync(Guid roleId);
    // 禁用角色
    Task<dynamic> DisableRoleAsync(Guid roleId);

}